fix: upgrade Go to 1.26.2 to patch stdlib vulnerabilities#9
Merged
Conversation
actions/setup-go@v5 does not strip the tool-name prefix from .tool-versions entries and treats "golang 1.26.2" as a literal version spec, which fails to resolve. go.mod works because setup-go understands the `toolchain` directive (pinned to go1.26.2), so both local and CI still share one source.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
govulncheckflagged four vulnerabilities in the Go 1.26.1 standard library —three in
crypto/x509(GO-2026-4947, GO-2026-4946, GO-2026-4866) and one incrypto/tls(GO-2026-4870) — all reachable through the preview server'shttp.Server.Servepath and all fixed in Go 1.26.2.While bumping the version, the CI workflows were also hardcoding
go-version: "1.26", which silently absorbs future patch drift. Pointingsetup-goatgo.modlets the pinnedtoolchain go1.26.2directive serveas the single source of truth for both local builds and CI.
Changes
.tool-versionsfromgolang 1.26.1togolang 1.26.2(local asdf)go.modtogo 1.26withtoolchain go1.26.2go.modinci.ymlandrelease.ymlviasetup-go'sgo-version-file